package com.ham.model;

import java.io.Serializable;

/**
 * 
 * @author dprima
 * 
 */
public class ItemRatingModel implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8388651990994132416L;

	public static final String TABLE_NAME = "ITEM_RATING_TMP";

	private String itemId;
	private String rating;
	private String ratingDate;

	public String getItemId() {
		return itemId;
	}

	public void setItemId(String itemId) {
		this.itemId = itemId;
	}

	public String getRating() {
		return rating;
	}

	public void setRating(String rating) {
		this.rating = rating;
	}

	public String getRatingDate() {
		return ratingDate;
	}

	public void setRatingDate(String ratingDate) {
		this.ratingDate = ratingDate;
	}

	public String getInsertStatement() {
		StringBuffer sb = new StringBuffer("INSERT INTO ");
		sb.append(TABLE_NAME + " VALUES(");
		sb.append(getItemId());
		sb.append(",'" + getRating() + "'");
		sb.append(",'" + getRatingDate() + "'");
		sb.append(")");
		return sb.toString();
	}

	@Override
	public String toString() {
		return "ItemRatingModel [itemId=" + itemId + ", rating=" + rating
				+ ", ratingDate=" + ratingDate + "]";
	}

}
